package com.yc.entities;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 质控批号表
 * </p>
 *
 * @author kuakha
 * @since 2021-04-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BloodSugarQualityControl对象", description="质控批号表")
public class BloodSugarQualityControl extends Model<BloodSugarQualityControl> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "质控批号主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "院长id")
    private Integer deanId;

    @ApiModelProperty(value = "科室id")
    private Integer departmentId;

    @ApiModelProperty(value = "对应user表id 操作人")
    private Integer userId;

    @ApiModelProperty(value = "质控批号名称")
    private String qualityControlName = "null";

    @ApiModelProperty(value = "范围最大值")
    private Double qualityMax;

    @ApiModelProperty(value = "范围最小值")
    private Double qualityMin;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
    @ApiModelProperty(value = "操作日期")
    @TableField(value = "add_time",fill = FieldFill.INSERT)
    private Date addTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
